package com.itheima;

public class ZuoYe08threemax {
    public static void main(String[] args) {
        int sum = getMax(3, 4, 5);
        System.out.println("最大值是：" + sum);
    }

    public static int getMax(int a, int b, int c) {
        int max;
        if (a > b) {
            if (a > c) {
                max = a;
            } else {
                max = c;
            }
        } else if (b < c) {
            max = c;
        } else {
            max = b;
        }
        return max;
    }
}
